Problem Note 45144: Maximum time for SLEEP() function and the CALL SLEEP routine
In SAS® 9.3 and earlier, the maximum allowed time for the SLEEP() function or the CALL SLEEP routine is
2**31 - 1 milliseconds,
or 24 days, 20 hours, 31 minutes, and 23.647 seconds.
Any attempt to specify a longer period results in a segmentation violation error in the SAS log or a note similar to the following:
NOTE: Invalid argument to function SLEEP at line 3 column 8.
st=2678400 _ERROR_=1 _N_=1
To sleep for longer periods of time, you can issue multiple calls to the function or routine.
The following example demonstrates how to sleep for 31 days:
data _null_ ;
st=31*24*60*60;
y=sleep(st/2,1);
y=sleep(st/2,1);
run ;
The maximum time period will be increased in a future release of SAS.
Operating System and Release Information
SAS System | N/A | z/OS | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Windows Vista | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Windows Vista for x64 | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
AIX | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
HP-UX | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Linux | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Linux for x64 | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Solaris | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The documentation for SLEEP() and the CALL SLEEP routine incorrectly state the maximum length of time a process can sleep.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-12-14 17:15:54 |
Date Created: | 2011-12-14 13:25:46 |